package com.example.test.mapper;


import com.example.test.entity.Repos;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ReposMapper {

    @Select("select * from repos;")
    List<Repos> findAll();

    @Select("select * from repos where repository_id = #{repository_id};")
    List<Repos> findByReposId(Integer reposId);

    @Select("select * from repos,rolerepos where repos.repository_id = rolerepos.repository_id and rolerepos.role_id=#{role_id};")
    List<Repos> findByRoleId(Integer roleId);
}
